package danling

type Client interface {
	RegisterDetonator(projects ...XpxxProjectInfo) (code int, err error)
	UploadQbrz(projects ...QbrzxxProjectInfo) (code int, err error)
	RegisterQbq(projects ...QbqProjectInfo) (code int, err error)
	RegisterUid(projects ...LshUidProjectInfo) (code int, err error)
}

type Req struct {
	Xpch     string `json:"xpch,omitempty"`        // 芯片厂号
	Projects []any  `json:"projectInfo,omitempty"` // 数据集合 自行去重, 最大1000
}
type Resp struct {
	Message string `json:"msg,omitempty"`
	Success string `json:"success,omitempty"`
}

type client struct {
	host   string
	desKey []byte
	xpch   string
}

type Qualified string // 结论

const (
	Pass Qualified = "0"
	Fail           = "1"
)

type QbCheckType string

const (
	Low  QbCheckType = "0"
	High             = "1"
)

func New(host string, desKey []byte, xpch string) Client {
	var c = &client{host: host, desKey: desKey, xpch: xpch}
	var h Client = c
	return h
}
